package com.hyfrogx.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Author: Luo
 * @Date: 2019/12/9 17:16
 */
@Data
@Component
public class ScoreCoinConfig {

    /**
     * 渠道号
     */
    @Value("${scorecoin.code}")
    private  String code;

    /**
     * 私钥
     */
    @Value("${scorecoin.privateKey}")
    private  String privateKey;

    /**
     * 公钥
     */
    @Value("${scorecoin.publicKey}")
    private   String publicKey;

    /**
     * 获取积分系统token地址
     */
    @Value("${scorecoin.token_coin}")
    private  String token_coin;

    /**
     * 发送包体积分系统
     */
    @Value("${scorecoin.send_coin}")
    private  String send_coin;

    /**
     * 获取用户总积分地址
     */
    @Value("${scorecoin.coin_count}")
    private  String coin_count;

    public static String code1;
    public static String privateKey1;
    public static String publicKey1;
    public static String token_coin1;
    public static String send_coin1;
    public static String coin_count1;

    @PostConstruct
    public void postCode(){
        code1 = this.code;
        privateKey1 = this.privateKey;
        publicKey1 = this.publicKey;
        token_coin1 = this.token_coin;
        send_coin1 = this.send_coin;
        coin_count1 = this.coin_count;
    }

    public static String  getCode(){
        return code1;
    }

    public static String  getPrivateKey(){
        return privateKey1;
    }

    public static String  getPublicKey(){
        return publicKey1;
    }

    public static String  getToken_coin(){
        return token_coin1;
    }

    public static String  getCoin_count(){
        return coin_count1;
    }

    public static String  getSend_coin1(){
        return send_coin1;
    }
}
